package com.leyou;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;

/*  TODO: @SpringCloudApplication 与 @SpringBootApplication注解相比
* 多了 注册服务与熔断器的注解 @EnableDiscoveryClient  @EnableCircuitBreaker
* 但是为什么只在网关配置熔断器呢，这是因为网关是接收用户所有请求的入口，如果在这里发生熔断，用户就不能访问到后面的服务了*/
@SpringCloudApplication
@EnableZuulProxy     //网关
@EnableFeignClients
@EnableScheduling   //开启定时任务
public class LyGateway {
    public static void main(String[] args) {
        SpringApplication.run(LyGateway.class, args);
    }
}